<div class="span-16 content">
    <h2><%= 'Sign up'.t %></h2>
    <% @user.password = @user.password_confirmation = nil %>

    <%= error_messages_for :user %>
    
    <% form_for :user, :url => url_for(:controller => 'users'), :html => {:multipart => true} do |f| -%>
        <p>
            <label for="login"><%= 'Login'.t %></label><br/>
            <%= f.text_field :login %>
        </p>
        
        <p>
            <label for="email"><%= 'Email'.t %></label><br/>
            <%= f.text_field :email %>
        </p>

        <p>
            <label for="password"><%= 'Password'.t %></label><br/>
            <%= f.password_field :password %>
        </p>

        <p>
            <label for="password_confirmation"><%= 'Confirm Password'.t %></label><br/>
            <%= f.password_field :password_confirmation %>
        </p>
        
        <% fields_for @user.profile do |profile| %>
        <p>
            <label for="avatar"><%= 'Choose your avatar'.t %></label><br/>
            <%= profile.file_field :avatar_data %>
        </p>
        <% end %>

        <p>
            <%= submit_tag 'Sign up'.t %>
        </p>
    <% end -%>
</div>
